//
//  AQRBGView.m
//  chanlin
//
//  Created by Ryan on 14-12-14.
//  Copyright (c) 2014年 chanlin. All rights reserved.
//

#import "AQRBGView.h"

@implementation AQRBGView

- (instancetype)initWithFrame:(CGRect)frame{
    self=[super initWithFrame:frame];
    if(self){
        self.zoomView=[[AQRImageZoomView alloc] initWithFrame:frame];
        self.bgImg=[[UIImageView alloc] initWithFrame:frame];
        [self addSubview:self.bgImg];
        self.mark=[[UIView alloc] initWithFrame:frame];
        self.mark.backgroundColor=[UIColor blackColor];
        self.mark.alpha=0.7;
        [self addSubview:self.mark];
        [self addSubview:self.zoomView];
    }
    return self;
}

- (void)hiddenImage{
    self.zoomView.hidden=YES;
    self.bgImg.hidden=YES;
    self.mark.hidden=YES;
    self.zoomView.hidden=YES;
}

- (void)hiddenBehind{
    self.zoomView.hidden=NO;
    self.bgImg.hidden=NO;
    self.mark.hidden=NO;
    self.zoomView.hidden=NO;
}

- (void)setFrame:(CGRect)frame{
    [super setFrame:frame];
    self.zoomView.frame=frame;
    self.bgImg.frame=frame;
    self.mark.frame=frame;
}

@end
